package com.cskaoyan.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;

/**
 * @author stone
 * @date 2022/05/30 16:37
 */
@Configuration
public class FileConfiguration {

    // 通过方法名作为默认的组件id来指定了
    // 也可以使用@Bean的value属性值来指定
    @Bean
    public CommonsMultipartResolver multipartResolver() {
        return new CommonsMultipartResolver();
    }
}
